/*
 * $Id: ObjectModelType.java 136 2009-07-16 07:53:43Z donbeave $
 */

package labour.concept.client.data;

import com.extjs.gxt.ui.client.data.DataField;
import com.extjs.gxt.ui.client.data.ModelType;

public class ObjectModelType extends ModelType {

  public ObjectModelType() {
    setRoot("data");
    setTotalName("totalCount");

    addFields();
  }

  protected void addFields() {
    addField(ObjectModel.ID);

    addField(ObjectModel.TYPE_ID);

    DataField field = new DataField(ObjectModel.SORT_ORDER);
    field.setType(Integer.class);
    addField(field);

    addField(ObjectModel.DATE_UPDATE);

    addField(ObjectModel.PARENT_ID);

    field = new DataField(ObjectModel.CHILDREN_COUNT);
    field.setType(Integer.class);
    addField(field);

    addField(ObjectModel.PARENT_UID);
    addField(ObjectModel.UID);
  }

}
